#include <iostream>
#include <vector>
using namespace std;

class Solution {
public:
    long record[30];
    bool recorded[30];
    Solution() {
        record[0]=1;
        record[1]=1;
        record[2]=2;
        recorded[0]=recorded[1]=recorded[2]=true;
        for(int i=3;i<30;i++)recorded[i]=false;
    }

    int numTrees(int n) {
        if(recorded[n]){
            return record[n];
        }
        long res=0;
        for(int i=1;i<=n;i++){
            res+=numTrees(i-1)*numTrees(n-i);
        }
        recorded[n]=true;
        record[n]=res;
        return res;
    }
};

int main() {
    Solution s;
    int n;
    cin>>n;
    cout<<s.numTrees(n)<<endl;

    return 0;
}